package com.hlk.factory.simple;

/**
 * @author hlk
 * @version 1.0
 * @date 2020-11-23 11:07
 */
public class Test {
    public static void main(String[] args) {
        // 一般的工厂
//        ShapeFactory factory = new ShapeFactory();
//        Shape circle = factory.getShape("CIRCLE");
//        circle.draw();

        // 通过反射获取
        ShapeFactory factory = new ShapeFactory();
        Shape circle = factory.getShapeByReflect(Circle.class);
        circle.draw();
    }
}
